-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CCIP-016 calculation script #19
base: main
Are you sure you want to change the base?
Conversation
still needs a little more work
Next will be integrating payout heights provided in CCIP
now accounts for start/end btc block heights and stx height equivalents, needs a little more work
Almost there, not matching 100% yet
Also writes the json from the last two calculations, no reads.
UpdateThings are coming along, not 100% there yet but when done it's a script that anyone with NodeJS installed can run to get the same results. It uses some creative approaches to API queries that we'll likely use elsewhere, and just needs some final tuning and independent verification. Per the CCIP, the criteria for someone to hit this bug is:
AnalysisTo analyze this, the script takes the following steps:
Examples are provided in Results are stored in The next step is to take those transactions and calculate what addresses were affected, and how much STX they should've received during each cycle. We have access to historical data through our Tardis contracts and can deploy something similar if needed. To run yourselfUntil this is merged you can run it by following the steps below with Node.JS installed:
HTTP:
The output will provide the analysis (WIP) and data files will be saved to the Future runs of the script will read from the files to minimize API calls. ScreenshotsLoading transactions Getting start/end block heights Finding missed payout transactions Example of cycle data Example of payout data Example of missed payout transactions Example of markdown output Example of markdown output when pasted into GitHub, although the format will likely change to create a "format report" that's easy to share:
@friedger or anyone proficient with SQL, can we verify the data produced by each step? I imagine there are some queries that would achieve the same goal. Verifying the examples from each step would be a bonus. |
Linked to commit a245d15612533bfacfd264f7bf3de240abf9f9be in citycoins/governance#16
This PR includes the script used to calculate who was affected by CCIP-016 and further interpret the data. The script can be run by anyone who wishes to independently verify the data.